home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-29 | 1.6 KB | 41 lines | [TEXT/GEOL] |
- Item 3816114 28-Aug-89 19:30
-
- From: SCHMUCKER1 Schmucker, Kurt,APL
-
- To: SARGENT Sargent, Greg,APL
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re: A little NIL Help
-
- Greg,
-
- MacApp 2.0ß9 checks for many conditions that would sometimes just slide by
- before. Like uninitialized variables. If a variable is unitialized and you
- use its value in a conditional, it might just seem to work because the random
- bits that are in that variable might meet the test. Then, later, when you
- least expect it, KABOOM.
-
- Every other MacApp programmer is being caught by the same things that are
- now troubling you. An object failing discipline usually means that you tried
- to send a message to something that wasn't an object. Use the "S" command in
- the debugger to see where you were when you blew up, and check to see that
- recently allocated objects truly got allocated. Use FailNil to test
- allocations.
-
- The popups are failing because you are doing something that requires the
- grafport to be set (in MacApp terms, the view to be focused). This is often
- something like calling one of the coordinate system changing routines
- (LocalToQD). MacApp now has MANY occurances of the "This view should really be
- focused now, I wonder if the programmer has done so, let's check it" call --
- which is AssumeFocus. If you get caught by one of these, just look in the 2.0
- release notes and check out your uses of the routines which assume focusing.
-
- We've all been there. And making these changes will make your code more
- robust.
-
- Best of luck,
-
- Kurt
-
-